package net.zjitc.Enum;

/**
 * @Author admin
 * @Date 2019/4/2 8:29
 */
public class SeaSonDemo {
    public static void main(String[] args) {
        System.out.println(Season.SUMMER);
        System.out.println(Season.SUMMER.ordinal());
        System.out.println(Season.SUMMER.getName()+":"+Season.SUMMER.getNum());
        System.out.println("-------------");
        processSeason(Season.SUMMER);
    }

//    应用一
    public static void processSeason(Season season){
        switch (season){
            case SPRING:
                System.out.println("春天");
                break;
            case SUMMER:
                System.out.println("夏天");
                break;
            case FALL:
                System.out.println("秋天");
                break;
            case WINTER:
                System.out.println("冬天");
                break;
        }
    }
}
